from lxml import etree

with open('test.html','r') as f:
    html = f.read()
# print(html)
html = etree.HTML(html)
node_list = html.xpath('//title')
print(node_list[0].text)
print(node_list[1].text)